﻿#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}




void MainWindow::on_action_1_triggered(bool checked)
{
    ui->dockWidget->setVisible(checked);
}

void MainWindow::on_action_2_triggered(bool checked)
{
    ui->dockWidget_2->setVisible(checked);
}

void MainWindow::on_dockWidget_visibilityChanged(bool visible)
{
    ui->action_1->setChecked(visible);
}

void MainWindow::on_dockWidget_2_visibilityChanged(bool visible)
{
    ui->action_2->setChecked(visible);
}

void MainWindow::on_listWidget_itemClicked(QListWidgetItem *item)
{
    ui->textEdit->append(item->text());
}

void MainWindow::on_listWidget_2_itemClicked(QListWidgetItem *item)
{
    ui->textEdit->append(item->text());
}
